var { initObj, formatObj } = require('../libs/common');

var init = function (data) {
    return initObj(mod, data);
}

var format = function (data) {
    return formatObj(mod, data);
}

// 联系人表
var mod = {
    pcode: {
        name: '被联系用户code',
        type: 'string',
        length: 12
    },
    fcode: {
        name: '粉丝用户code',
        type: 'string',
        length: 12
    },
    history:{
        name: '联系历史',
        type: 'string',
        length: 5000
    },
    createtime: {
        name: '创建时间',
        type: 'date',
        default: new Date()
    },
    updatetime: {
        name: '更新时间',
        type: 'date',
        default: new Date()
    }
};

module.exports = {
    init,
    format
};